<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Create User</title>
    </h:head>
    <h:body>
        <h:message style="color: red" for="form"></h:message>
        <h:form id="form">
            <p>
                <h:message style="color: red" for="username" />
                Login: <h:inputText id="username" required="true" value="#{userBean.username}"> </h:inputText>
            </p>
            <p>
                <h:message style="color:red" for="password"/>
                password: <h:inputText id="password" required="true" value="#{userBean.password}"></h:inputText>

            </p>
            <p>
                <h:message style="color:red" for="firstname"/>
                first name: <h:inputText id="firstname" required="true" value="#{userBean.firstName}"></h:inputText>

            </p>
            <p>
                <h:message style="color:red" for="lastname"/>
                last name: <h:inputText id="lastname" required="true" value="#{userBean.lastName}"></h:inputText>

            </p>
            <p>
                <h:message style="color:red" for="email"/>
                email: <h:inputText id="email" required="true" value="#{userBean.email}"></h:inputText>

            </p>
            <p>
                <h:message style="color:red" for="cic"/>
                CIC Member: <h:selectBooleanCheckbox id="cic" value="#{userBean.CIC}" />

            </p>
            <p>
                <h:message style="color:red" for="evaluator"/>
                Evaluator: <h:selectBooleanCheckbox id="evaluator" value="#{userBean.evaluator}" />

            </p>
            <p>
                <h:selectManyCheckbox value="#{userBean.degreeProgramsList}">
                    <f:selectItems value="#{userBean.degreeProgramss}" var="u"
                                   itemLabel="#{u.identifier}" itemValue="#{u.identifier}" />
                </h:selectManyCheckbox>
            </p>
            <p>
                <h:commandButton id='submit' value="Submit" action="#{userBean.createUser()}" />
            </p>
        </h:form>
    </h:body>
</html>

